package sysu.el.array.ints.algors;

import sysu.el.array.algors.Sig;
import junit.framework.TestCase;

public class RepeatedElemTest extends TestCase {
	public void testA(){
		int a[] = new int[]{1, 1, 2, 2, 3};
		int k = RepeatedElem.eliminate(a.length, a);
		assertEquals(k, 3);
		for (int i=0; i<k; i++){
			assertEquals(a[i], i+1);
		}
		System.out.println(Sig.mkString(a, "\t"));
	}
}
